<html>
<head>
<title>hehehe</title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>

<?php
$a = array();
$a[0] = "Hieu";
$a[1] = "Khoa";
$a[2] = "Tinh";
$abc = json_encode($a);
?>
<input type="button" onclick="abc();" value="Click on me" > </button>
<div id="asdas"></div>
<div style="display:none" id="id1">Hello!</div>
<div style="display:none" id="id2">Hello!</div>
<div style="display:none" id="id3">Hello!</div>

<script type="text/javascript">

function abc(){
	$.each($('div:hidden'),function(index,value){
			var currentID = $(this).attr("id");
			console.log(currentID);
		});

//	var jsonName = '<?php echo $abc; ?>';
//	var arrayName = jQuery.parseJSON(jsonName);
//	alert(arrayName[1]);
	
}
</script>
</body>
</html>

